import enUS from './lang/en-US';
import zhCN from './lang/zh-CN';
import esES from './lang/es-ES';
import jaJP from './lang/ja-JP';
import { createI18n } from 'vue-i18n'

export const defaultLang = uni.getStorageSync('language')?uni.getStorageSync('language'):'zh-CN';

const messages = {
  'en-US': {
    ...enUS
  },
  'zh-CN': {
    ...zhCN
  },
  'es-ES': {
    ...esES
  },
  'ja-JP': {
    ...jaJP
  },
}

const i18n = createI18n({
  locale: defaultLang,
  fallbackLocale: defaultLang,
  messages
})
export default i18n;

